namespace CSharpPro._0925;

public class Demo
{
    public void TestPrint()
    {
        int num = 123;
        int num2 = Convert.ToInt32(Console.ReadLine());
        //取百位
        Console.WriteLine(num / 100);
        //取十位
        Console.WriteLine(num / 10 % 10);
        Console.WriteLine(num % 100 /10);
        //取个位
        Console.WriteLine(num %10);
        
    }
    
    
    
    
    //判断闰年
    //1.能被4整除，并且不能被100整除
    //2.能被400整除
    public void TestPrint1()
    {
        int year = Convert.ToInt32(Console.ReadLine());
        bool flag = (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
        if (flag == true)
        {
            Console.WriteLine("是闰年");
        }
        else
        {
            Console.WriteLine("不是闰年");
        }

    }
    
    
    public void TestPrint2()
    {   Console.WriteLine("1.航班出行");
        Console.WriteLine("2.动车出行");
        Console.WriteLine("请输入数字选择出行方式：");
        int a = Convert.ToInt32(Console.ReadLine());
        Console.WriteLine("请输入出行月份：");
        int b = Convert.ToInt32(Console.ReadLine());
        double m = 8800;
        double end = 0;
        if (b >= 5 && b <= 10)
        {
            if (a == 1)

            {
                end = m * 0.9;
            }

            if (a == 2)
            {
                end = m * 0.75;
            }
        }
        else
        {
            if (a == 1)

            {
                end = m * 0.6;
            }

            if (a == 2)
            {
                end = m * 0.3;
            }
        }
        Console.WriteLine("此次旅游行程的价格为；" + end);
       
    }
    
    
    public void TestPrint3()
    {
        
        Console.WriteLine();
    }
}